package com.ruoyi.business.service.impl;

import com.ruoyi.business.mapper.WsdCanteenStaffMapper;
import com.ruoyi.business.service.IWsdCanteenStaffService;
import com.ruoyi.common.core.domain.entity.WsdCanteenStaff;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 饭堂人员管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-15
 */
@Service
public class WsdCanteenStaffServiceImpl implements IWsdCanteenStaffService
{
    @Autowired
    private WsdCanteenStaffMapper wsdCanteenStaffMapper;

    /**
     * 查询饭堂人员管理
     * 
     * @param id 饭堂人员管理主键
     * @return 饭堂人员管理
     */
    @Override
    public WsdCanteenStaff selectWsdCanteenStaffById(Long id)
    {
        return wsdCanteenStaffMapper.selectWsdCanteenStaffById(id);
    }

    /**
     * 查询饭堂人员管理列表
     * 
     * @param wsdCanteenStaff 饭堂人员管理
     * @return 饭堂人员管理
     */
    @Override
    public List<WsdCanteenStaff> selectWsdCanteenStaffList(WsdCanteenStaff wsdCanteenStaff)
    {
        return wsdCanteenStaffMapper.selectWsdCanteenStaffList(wsdCanteenStaff);
    }

    /**
     * 新增饭堂人员管理
     * 
     * @param wsdCanteenStaff 饭堂人员管理
     * @return 结果
     */
    @Override
    public int insertWsdCanteenStaff(WsdCanteenStaff wsdCanteenStaff)
    {
        wsdCanteenStaff.setCreateTime(DateUtils.getNowDate());
        return wsdCanteenStaffMapper.insertWsdCanteenStaff(wsdCanteenStaff);
    }

    /**
     * 修改饭堂人员管理
     * 
     * @param wsdCanteenStaff 饭堂人员管理
     * @return 结果
     */
    @Override
    public int updateWsdCanteenStaff(WsdCanteenStaff wsdCanteenStaff)
    {
        wsdCanteenStaff.setUpdateTime(DateUtils.getNowDate());
        return wsdCanteenStaffMapper.updateWsdCanteenStaff(wsdCanteenStaff);
    }

    /**
     * 批量删除饭堂人员管理
     * 
     * @param ids 需要删除的饭堂人员管理主键
     * @return 结果
     */
    @Override
    public int deleteWsdCanteenStaffByIds(Long[] ids)
    {
        return wsdCanteenStaffMapper.deleteWsdCanteenStaffByIds(ids);
    }

    /**
     * 删除饭堂人员管理信息
     * 
     * @param id 饭堂人员管理主键
     * @return 结果
     */
    @Override
    public int deleteWsdCanteenStaffById(Long id)
    {
        return wsdCanteenStaffMapper.deleteWsdCanteenStaffById(id);
    }
}
